﻿using Com.JunCaiSoft.AutoMapper;
using Com.JunCaiSoft.SystemConfig.Entity;
using Com.JunCaiSoft.SystemConfig.Model;
using Microsoft.AspNetCore.Builder;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.SystemConfig
{
    public class SystemConfigAutoMapperConfigure
    {
        public static void CreateHrMapper(IApplicationBuilder app)
        {
            var creator = app.UseAutoMapper();

            #region AppSecret管理映射
            creator.CreateMap<AppSecretManageView, AppSecretManage>();
            creator.CreateMap<AppSecretManage, AppSecretManageView>();
            creator.CreateMap<AppSecretManage, AppSecretManageItem>()
                .ForMember(dest => dest.CreateTime, opt => opt.MapFrom(src => src.CreateTime.ToString("yyyy-MM-dd")));
            #endregion

            #region 部门管理映射

            #endregion
        }
    }
}
